package sample.panel;

import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.panel.Panel;

import sample.page.CreatePage;
import sample.page.DeletePage;
import sample.page.ReadPage;
import sample.page.TopPage;
import sample.page.UpdatePage;

@SuppressWarnings("serial")
public class MenuPanel extends Panel{
	
	public MenuPanel(String WicketID,final PageParameters pram){
		super(WicketID);
		
		Link<Void> LinkToCreate=new Link<Void>("LinkToCreate"){
			@Override
			public void onClick() {
				setResponsePage(CreatePage.class,pram);
			}
		};
		Link<Void> LinkToRead=new Link<Void>("LinkToRead"){
			@Override
			public void onClick() {
				setResponsePage(ReadPage.class,pram);
			}
		};
		Link<Void> LinkToUpDate=new Link<Void>("LinkToUpDate"){
			@Override
			public void onClick() {
				setResponsePage(UpdatePage.class,pram);
			}
		};
		Link<Void> LinkToDelete=new Link<Void>("LinkToDelete"){
			@Override
			public void onClick() {
				setResponsePage(DeletePage.class,pram);
			}
		};
		Link<Void> LinkToTop=new Link<Void>("LinkToTop"){
			@Override
			public void onClick() {
				setResponsePage(TopPage.class,pram);
			}
		};
		add(LinkToCreate);
		add(LinkToRead);
		add(LinkToUpDate);
		add(LinkToDelete);
		add(LinkToTop);
	}
}
